


~ATH and You; A Primer

by openSystem



Category: Homestuck
Genre: Replay Value AU, ~ATH
Language: English
Status: In-Progress
Published: 2012-12-17
Updated: 2012-12-24
Packaged: 2017-11-21 08:51:04
Rating: Teen And Up Audiences
Warnings: Creator Chose Not To Use Archive Warnings
Chapters: 4
Words: 815
Publisher: archiveofourown.org
Story URL: https://archiveofourown.org/works/595823
Author URL: https://archiveofourown.org/users/openSystem/pseuds/openSystem
Summary: <blockquote class="userstuff">
              <p>Bash writes a tutorial on ~ATH because he's tired of people screwing over their sessions with it.</p><p>For the lovely Replay Value AU by GodsGiftToGrinds, of which I have fallen in love with.</p>
            </blockquote>





	1. Table of Contents

**Author's Note:**

> Chapter Three(2) isn't done yet, but it needs to be posted for the chapters to be in the correct order. This note should go away in a few days once I finish up the chapter.
    
    
                        =================================
                        ||    ~ATH and You; A Primer   ||
                        =================================
                        |Or, how to not be a grinningCat|
                        +-------------------------------+
                              A Guide by openSystem     
    
    
    Foreward and Disclaimer: I've noted a few cases of people on PTowers and SB.org
    generally being dipshits about using ~ATH, and in hopes of getting less people
    killed I'm going to write this guide. I'm currently a time player so sections
    /may/ upload out of order. Regardless, on to the guide.
    
                            =======================
                            || Table Of Contents ||
                            =======================
    
    1. How ~ATH Works·······················································[ONLINE]
    2. Basic Terminology and Important Notes·······························[OFFLINE]
    3. Starting to Program in ~ATH··········································[ONLINE]
    4. Learning the Library················································[OFFLINE]
    5. Interacting with the Universe·······································[OFFLINE]
    
    
    This guide will also be using my modified ~ATH editor because let's just face it
    the standard editor is a huge pain. You can find it on PTowers under my handle.


	2. How ~ATH Works


    (( 1. How ~ATH Works ))
    
    Alright so you want to know how ~ATH works? Well, here's the thing. Nobody knows
    why ~ATH can do the shit it does. Maybe it's just part of our reality. Who
    has any idea? No, FG's do not count.
    
    Regardless there are a two different theories on what exactly ~ATH is, and I
    might as well explain them at least a little.
    
    First off is a more recent theory, Universe Hijacking. UH as a theory was
    developed by replayers after they learned that SBURB ran on ~ATH. The theory
    in its most basic form simply states that the universe(s) run on code, and ~ATH
    is a subset of that code that overwrites reality. This theory actually shows
    the most promise of being true and is generally accepted as being indisputable.
    
    Most of the older theories are all variations on a theme of "X Deity's Divine
    Y" created ~ATH. I wish I was kidding but when a program can fuck with the
    universe, it makes a bit of sense.
    
    Sorry for the short section but this is really most of my knowledge on the
    subject. For more information I suggest speaking with archivalHexagram.


	3. Basic Terminology and Important Notes


    --Chapter Offline--


	4. Starting to Program in ~ATH


    (( 3. Starting to Program in ~ATH ))
    
    Here's the first thing you're going to want to know, the Graveyard. You're pretty
    much always going to be using this to set off other loops.
    
    [code]
    ~ATH(THIS) {
    
        // ADDITIONAL GRAVES...
    
    } EXECUTE(NULL);
    
    THIS.DIE();
    [/code]
    
    So let's break this down. This program, when run, (1)starts a loop that waits for
    the death of the program using the command ~ATH(THIS). Then, (2)it kills the
    program, allowing the loop to run any code found in the (3)//ADDITIONAL GRAVES...
    before running the (4)EXECUTE(NULL); command. EXECUTE allows you to call other
    programs that are ~ATH. NULL is built into the language and simply does nothing*
    
    Most people use this form of the Graveyard for it's simplicity, but there are
    quite a few other options that are equally valid and widespread, if for more
    specific uses. As this is a primer, I'll simply be sticking with the standard for
    any programs.
    
    *Note that NULL has many uses in more advanced programs, especially ones dealing
    with modifying the universe
    
    Moving right along, let's talk about functions. Often affectionatly dubbed
    "Headstones" by programmers, these are the backbone of your entire program.
    Below is an example program with a Graveyard and an example function.
    
    [code]
    //IMPORTS
    IMPORT CONSOLE CONSOLE;
    
    //GRAVEYARD
    ~ATH(THIS) {
    
    } EXECUTE(TEST(1));
    
    THIS.DIE();
    
    //HEADSTONE
    FUNCTION TEST(INT A) RETURNS NULL{
        
        CONSOLE.OUT.PRINTLN(A);
    }    
    [/code]
    
    [output]
    1
    [/output]
    
    Starting here I'm not going to be breaking down code for you, so learn quick and
    think faster. You should recognize the idea of importing, and the use of the
    function/headstone. CONSOLE is part of the standard library and refers to the
    computer that is running the code. Also note the syntax for declaring a
    function: "FUNCTION name(parameters) returns returntype{}". Parameters are
    optional but returntype is mandatory, even if a function returns nothing, in
    which case use NULL as the returntype.
    
    Moving right along, the next thing you're probably wondering is "What about
    Classes?". Enter the term "Ossuary", which if you stick around long enough to
    use ~ATH you'll hear more often than Class. The morbidness grows on you, I
    assure you. We don't call it murdercode for nothing. Anyway, here's a short
    exercise for you to puzzle through to get your brain wrapped around Ossuaries.
    
    [code filename="RUN.~ATH"]
    ~ATH(THIS) {
    
    } EXECUTE(PUZZLE.F1());
    
    THIS.DIE();
    [/code]
    
    [code filename="PUZZLE.~ATH"]
    OSSUARY PUZZLE
    
    IMPORT CONSOLE CONSOLE;
    VAR STRING NAME
    
    FUNCTION F1() RETURNS NULL{
        CONSOLE.OUT.PRINT("ENTER YOUR NAME BELOW \n>");
        NAME = CONSOLE.IN.NEXTLINE();
        CONSOLE.OUT.PRINT("NICE TO MEET YOU, " + NAME +".");   
    }
    [/code]
    
    Finished with that? Alright, recap for the stragglers. Ossuaries can be in
    seperate files with the same name (I.E. OSSUARY PUZZLE in PUZZLE.~ATH), and
    "VAR variabletype name" defines a variable.
    
    I'd suggest looking at the ~ATH manual's list of beginner excersises and
    coming back for the next chapter.

**Author's Note:**

> The WIP guide can be found here: http://sync.in/-ATHwithOS


End file.
